import 'package:flutter/material.dart';

class NavigatorUtil{

  ///[context] 上下文
  ///[widget] 待跳转的页面
  ///[maintainState] 跳转后是否需要释放资源，false为是，true为不是
  push(BuildContext context,Widget widget,bool maintainState){
    Navigator.push(
        context,
        new MaterialPageRoute(
            builder:(context)=>widget,
            maintainState:maintainState
        ),
    );
  }
}